import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import federation from '@originjs/vite-plugin-federation'

export default defineConfig({
  plugins: [
    vue(),
    federation({
      name: 'main-app',
      remotes: {
        'base': 'http://localhost:3000/dist/assets/remoteEntry.js'
      },
      shared: {
        vue: {
            requiredVersion: "^3.2.45"
        },
        pinia: {
            requiredVersion: "^2.2.6"
        }
      }
    })
  ]
})